package pers.vinsonws.jianghu.serverspring.repositories;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import pers.vinsonws.jianghu.serverspring.entity.ApplyChatRooms;

import java.util.Set;

/**
 * @auther vinsonws
 * @date 2018/11/6 0:32
 */
@Repository
public interface ApplyChatRoomRepository extends JpaRepository<ApplyChatRooms, Integer> {
    Set<ApplyChatRooms> findAllByChatRoomId(int chatRoomId);
    Set<ApplyChatRooms> findAllByUserId(int userId);
    ApplyChatRooms findByChatRoomIdAndUserId(int chatRoomId, int userId);
}
